/*
 * Copyright ©2015-2021 Jaemon. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gitee.jaemon.spring.adorner;

import java.time.format.DateTimeFormatter;

/**
 * Adorner常量
 *
 * @author Jaemon
 * @since 1.0
 */
public interface AdornerConstants {
    String ADORNER_SOURCE = "https://gitee.com/jaemon/spring-adorner";

    String banner = "" +
            "   _____            _                           _                            \n" +
            "  / ____|          (_)                 /\\      | |                           \n" +
            " | (___  _ __  _ __ _ _ __   __ _     /  \\   __| | ___  _ __ _ __   ___ _ __ \n" +
            "  \\___ \\| '_ \\| '__| | '_ \\ / _` |   / /\\ \\ / _` |/ _ \\| '__| '_ \\ / _ \\ '__|\n" +
            "  ____) | |_) | |  | | | | | (_| |  / ____ \\ (_| | (_) | |  | | | |  __/ |   \n" +
            " |_____/| .__/|_|  |_|_| |_|\\__, | /_/    \\_\\__,_|\\___/|_|  |_| |_|\\___|_|   \n" +
            "        | |                  __/ |                                           \n" +
            "        |_|                 |___/                                            ";

    String NEWLINE = "\n";
    String LINE_BREAK_SYMBOL = System.getProperty("line.separator") == null ? "\r\n" : System.getProperty("line.separator");
    String TAB = "\t";
    String COLON = ": ";
    String COMMA = ",";
    String EMPTY = "";

    String DEFAULT_CHARSET = "UTF-8";
    DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    DateTimeFormatter DATETIME_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd HHmmss");
    DateTimeFormatter DATETIME_MS_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");

    /**
     * Adorner日志输出文件名
     */
    String DEFAULT_LOG_FILE = "adorner.log";

    String MARKDOWN_ITEM = "- ";

    String SPRING_ADORNER_ENV_PREFIX = "spring.adorner.";
    /**
     * 是否显示注释环境变量设置
     *
     * <ul>
     *     <li>
     *         方式1(VM options): -Dspring.adorner.json.handler.notes=false
     *     </li>
     *     <li>
     *         方式2： System.setProperty(AdornerConstants.SPRING_ADORNER_JSON_HANDLER_NOTES, "false");
     *     </li>
     * </ul>
     */
    String SPRING_ADORNER_JSON_HANDLER_NOTES = SPRING_ADORNER_ENV_PREFIX + "json.handler.notes";

    /** markdown字段表格标题-字段名称 */
    String SPRING_ADORNER_TABLE_COLUMN_NAME = SPRING_ADORNER_ENV_PREFIX + "table.column.name";
    /** markdown字段表格标题-字段类型 */
    String SPRING_ADORNER_TABLE_COLUMN_TYPE = SPRING_ADORNER_ENV_PREFIX + "table.column.type";
    /** markdown字段表格标题-是否必选 */
    String SPRING_ADORNER_TABLE_COLUMN_MUST = SPRING_ADORNER_ENV_PREFIX + "table.column.must";
    /** markdown字段表格标题-字段注释 */
    String SPRING_ADORNER_TABLE_COLUMN_NOTES = SPRING_ADORNER_ENV_PREFIX + "table.column.notes";

    /** markdown文档api『请求地址』值描述 */
    String SPRING_ADORNER_API_REQUEST_URL = SPRING_ADORNER_ENV_PREFIX + "api.request.url";
    /** markdown文档api『请求方法』值描述 */
    String SPRING_ADORNER_API_REQUEST_METHOD = SPRING_ADORNER_ENV_PREFIX + "api.request.method";
    /** markdown文档api『请求参数』值描述 */
    String SPRING_ADORNER_API_REQUEST_PARAM = SPRING_ADORNER_ENV_PREFIX + "api.request.param";
    /** markdown文档api『请求示例』值描述 */
    String SPRING_ADORNER_API_REQUEST_EXAMPLE = SPRING_ADORNER_ENV_PREFIX + "api.request.example";
    /** markdown文档api『响应参数』值描述 */
    String SPRING_ADORNER_API_RESPONSE_PARAM = SPRING_ADORNER_ENV_PREFIX + "api.response.param";
    /** markdown文档api『响应示例』值描述 */
    String SPRING_ADORNER_API_RESPONSE_EXAMPLE = SPRING_ADORNER_ENV_PREFIX + "api.response.example";
}